{% from "common/_macros.html" import static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    {% include "common/_heads.html" %}
    <link rel="stylesheet" href="{{ static('cms/css/base.css') }}">
    <script src="{{ static('cms/js/base.js') }}"></script>
    {% block head %}{% endblock %}
</head>
<body id="maintbody">
     <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="{{ url_for('cms.index') }}" style="font-size: 23px">小麻雀综合测试平台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="{{ url_for('cms.profile') }}">{{g.cms_user.username}}</a></li>
            <li><a href="{{ url_for('cms.logout') }}">注销</a></li>
          </ul>
          <form class="navbar-form navbar-right">
            <input type="text" class="form-control" style="display: none" placeholder="查找...（功能暂未实现）">
          </form>
            <ul class="nav navbar-nav navbar-right">
          </ul>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
          <div class="col-sm-3 col-md-2 sidebar">
              {% set cms_user = g.cms_user %}
              <ul class="nav-sidebar">
                  <li class="unfold"><a href="{{ url_for('cms.index') }}">首页</a></li>
                  <li class="profile-li">
                      <a href="#">用户中心<span></span></a>
                      <ul class="subnav">
                          <li><a href="{{ url_for('cms.profile') }}">用户信息</a></li>
                          <li><a href="{{ url_for('cms.resetpwd') }}">修改密码</a></li>
                          <li><a href="{{url_for('cms.resetemail') }}">修改邮箱</a></li>
                      </ul>
                  </li>

                  <li class="feedback-li">
                      <a href="#">反馈管理<span></span></a>
                      <ul class="subnav">
                          <li class="feedback-manage"><a href="{{url_for('cms.feedback')}}">反馈记录管理</a></li>
                          {% if cms_user.is_developer %}
                            <li class="uploadfile-manage"><a href="{{url_for('cms.uploadfilepage')}}">反馈记录导入</a></li>
                          {% endif %}
                      </ul>
                  </li>

                      <li class="sparrow-li">
                          <a href="#">接口测试<span></span></a>
                          <ul class="subnav">
                              <li><a href="{{ url_for('cms.case_group') }}">用例分组</a></li>
                              <li><a href="{{ url_for('cms.case_manage') }}">用例管理</a></li>
                              <li><a href="{{ url_for('cms.case_plan') }}">用例计划</a></li>
                              <li style="display: none"><a href="">用例执行</a></li>
                              <li style="display: none"><a href="">调度配置</a></li>
                              <li><a href="{{ url_for('cms.case_execute_res') }}">执行结果</a></li>
                          </ul>
                      </li>
                  {% if cms_user.is_developer %}
                      <li class="permission-li">
                          <a href="#">权限管理<span></span></a>
                          <ul class="subnav">
                              <li class="cmsuser-manage"><a href="{{url_for('cms.cusers')}}">CMS用户管理</a></li>
                              <li class="cmsrole-manage"><a href="{{url_for('cms.croles')}}">CMS角色管理</a></li>
                          </ul>
                      </li>
                  {% endif %}

              </ul>
          </div>
          <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
              <h4>{% block page_title %}{% endblock %}</h4>
              <div class="main_content">
                  {% block main_content %}{% endblock %}
              </div>
          </div>
      </div>
    </div>
</body>
</html>